#ifndef __VIEWER_H
#define __VIEWER_H

#include <gtkmm/table.h>
#include <gtkmm/label.h>
#include <gtkmm/eventbox.h>
#include <gtkmm/button.h>
#include <gtkmm/window.h>
#include <gdkmm/color.h>
#include <gtkmm/scrolledwindow.h>
#include <gtkmm/frame.h>
#include <gtkmm/radiobutton.h>
#include <gtkmm/box.h>
#include <gtkmm/alignment.h>
#include <gtkmm/paned.h>
#include <gtkmm/style.h>
#include <gtkmm/table.h>
#include <gtkmm/messagedialog.h>
#include <gtkmm/uimanager.h>
#include <gtkmm/actiongroup.h>
#include <gtkmm/radioaction.h>
#include <gtkmm/stock.h>
#include <gtkmm/menu.h>
#include <gtkmm/entry.h>
#include <gtkmm/dialog.h>
#include <gtkmm/progressbar.h>
#include "newGridAction.h"
#include "resultsDialogAction.h"
#include "gridData.h"
#include "executionController.h"


class newGridAction;
class resultsDialogAction;
class executionController;
struct gridData;


class viewer : public Gtk::Window
{ 
	public:
		viewer();
  		virtual ~viewer();
		int getCellButtonActive();

	private:
		virtual void on_button_execute_clicked();
		virtual void on_window_quit();
		virtual void on_menu_cell_spacing();
		virtual void on_menu_show_results();
		virtual void on_show_new_dialog();

		//Functions
		void createMenu();
		void createRadioButtons();

  		//Member widgets:
		Gtk::VBox mainBox;
		Gtk::HBox secondaryBox;
		Gtk::VBox leftBox;
		Glib::RefPtr<Gtk::UIManager> manager;
		Glib::RefPtr<Gtk::ActionGroup> actionGroup;
		Glib::RefPtr<Gtk::ToggleAction> cellSpacing;
		Gtk::Alignment rightAlignment;
		Gtk::Alignment leftAlignment;
		Gtk::VBox rightBox;
		Gtk::VBox radioButtonsBox;
		Gtk::Frame cellTypesFrame;
		Gtk::VBox cellTypesBox;
		Gtk::Alignment executeAlignment;
		Gtk::Button execute;
		Gtk::RadioButton road;
		Gtk::RadioButton grass;
		Gtk::RadioButton trail;
		Gtk::RadioButton start;
		Gtk::RadioButton goal;
		Gtk::RadioButton wall;
		Gtk::RadioButton::Group cellTypes;
		Gtk::Frame dataFrame;
		Gtk::VBox dataBox;
		Gtk::RadioButton unsortedA;
		Gtk::RadioButton sortedAByF;
		Gtk::RadioButton sortedAByXY;
		Gtk::RadioButton skipL;
		Gtk::RadioButton hashT;
		Gtk::RadioButton hashTVector;
		Gtk::RadioButton::Group data;

		//Members
		newGridAction* nGridAction;
		resultsDialogAction* rDialogAction;
		executionController* eController;
		gridData* gData;
};

enum structures {
	UNSORTED_VECTOR,
	SORTED_VECTOR_BY_F,
	SORTED_VECTOR_BY_XY,
	SKIP_LIST,
	HASH_TABLE,
	HASH_TABLE_VECTOR
};

#endif
